import React, {Component} from 'react'
import {View} from '@tarojs/components'

import Taro from "@tarojs/taro"

import './index.less'
import SearchBar from "../../components/SearchBar";
import EmotionAnalysis from '../../components/Echarts/EmotionAnalysis'
import WebsiteStatistics from '../../components/Echarts/WebsiteStatistics';



//主界面
class Index extends Component {


  constructor(props) {
    super(props);
    this.state = {
      
    }
  
}

  componentWillReceiveProps(nextProps) {
    console.log(this.props, nextProps)
  }

  componentWillUnmount() {
  }

  componentDidShow() {
    Taro.setTabBarStyle({
      backgroundColor: "#000539",
      color: '#ffffff'
    })
  }

  componentDidHide() {
    Taro.setTabBarStyle({
      backgroundColor: "#ffffff",
      color:'#000000'
    })
  }

  render() {
    return (
      <View className='index'>
        <View className='index-bg' ></View>
        <SearchBar />
        {/* <View className='emotion-analysis'>
          <View className='caption emotion-analysis-caption'>
          情感分析
          </View>
          <EmotionAnalysis />
        </View>   */}
        
        <View className='website-statistics'>
          <View className='caption '>
          网站统计
          </View>
          <WebsiteStatistics />
        </View>
      </View>
    )
  }
}

export default Index

